<template>
  <!-- 模板 -->
  <div class="hello">
    <p>{{ msg }}</p>
    <ul>
      <li v-for="(item, index) in todos" :key="index">{{index}}. {{item.text}}</li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  props: {
    msg: {
      type: String,
      required: true,
      default: '你好！！！'
    },
    todos: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style scoped>
h3 {
  margin: 40px 0 0;
}
a {
  color: #42b983;
}
</style>
